package facade.Alumno;

import java.util.ArrayList;
import java.util.List;

import dao.implementations.postgresql.Alumno.AlumnoDB;
import dao.interfaces.Alumno.IAlumno;
import dao.transferObjects.Gae.AlumnoTO;
import dao.transferObjects.Gae.CursoTO;
import dao.transferObjects.Gae.GaeTO;
import facade.FacadeBase;

public class FacadeAlumno extends FacadeBase {

	public int insertarAlumno(AlumnoTO alumno) {
		return 0;
	}

	public int modificarAlumno(AlumnoTO alumno) {
		return 0;
	}

	public int eliminarAlumno(AlumnoTO alumno) {
		return 0;
	}

	public int asignarAlumnoGae(GaeTO gae, AlumnoTO alumno) {
		return 0;
	}

	public int asignarAlumnoRepresentante(GaeTO gae) {
		return 0;
	}

	public int crearAlumnoCurso(AlumnoTO alumno) {
		return 0;
	}

	public int eliminarAlumnosCurso(CursoTO curso) {
		return 0;
	}
	
	public List<AlumnoTO> obtenerAlumnosCurso(CursoTO curso)
	{
		List<AlumnoTO> alumnosCurso = new ArrayList<AlumnoTO>();
		
		IAlumno alumnoDB = new AlumnoDB(this.connection.getConnection());
		
		alumnosCurso = alumnoDB.obtenerAlumnosCurso(curso);
		
		this.closeConnection();		
		return alumnosCurso;
	}
	
	public List<AlumnoTO> obtenerAlumnosGae(GaeTO gae) {
		List<AlumnoTO> alumnosGae = new ArrayList<AlumnoTO>();
		IAlumno alumnoDB = new AlumnoDB(this.connection.getConnection());
		
		alumnosGae = alumnoDB.obtenerAlumnosGae(gae);
		
		this.closeConnection();		
		return alumnosGae;
	}
	
	public int autoevaluarAlumnoGae(AlumnoTO alumno)
	{
		int resp = -1;
		IAlumno alumnoDB = new AlumnoDB(this.connection.getConnection());
		
		resp = alumnoDB.autoevaluarAlumnoGae(alumno);
		
		this.closeConnection();
		
		return resp;
	}

}
